<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="../static/semantis-ui/semantic.min.css">
    <script type="text/javascript" src="../static/semantis-ui/jquery-3.6.0.js"></script>
    <script src="../static/semantis-ui/semantic.min.js"></script>
    <link rel="stylesheet" href="../static/css/me.css">
    <title>搜索结果</title>
</head>
<body>
<!--导航-->
<!--segment反转 inverted平铺 导航栏-->
<nav class="ui segment inverted attached segment me-padded-tb-mini bg">
    <!--放在一个container中-->
    <div class="ui container ">
        <!--里面的菜单   stackable适应手机-->
        <div class="ui inverted stackable menu bg">
            <h2 class="ui teal header item ">HJ&nbsp&nbspblog</h2>
            <a href="#" class="m-item item m-mobile-hide"><i class="m-margin-tb-menu icon home"></i>首页</a>
            <a href="#" class="m-item item m-mobile-hide"><i
                    class="m-margin-tb-menu folder open outline icon"></i>分类</a>
            <a href="#" class="m-item item m-mobile-hide"><i
                    class="active m-margin-tb-menu edit outline icon"></i>标签</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="m-margin-tb-menu edit outline icon"></i>归档</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="m-margin-tb-menu meh outline icon"></i>关于我</a>
            <div class="right m-item item m-mobile-hide" th:fragment="_fragments :: search">
                <form action="#" name="search" th:action="@{/search}" target="_blank" method="post" >
                    <!--transparent透明-->
                    <div class="ui icon inverted transparent input">
                        <input type="text" name="query" placeholder="Search...." th:value="${query}">
                        <i class="search icon link" onclick="document.forms['search'].submit()"></i>
                    </div>
                </form>
            </div>

        </div>
    </div>
    <!--三条杠 更多按钮-->
    <a href="#" class="ui icon button menu toggle m-right-top bg white-font m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>

<!--中间-->
<div class="m-padded-d-mass">
    <div class="m-container-small m-padded-tb-big">
        <div class="ui container">
            <!--header -->
            <!--头表 attached附加 会把挨着的segment连起来-->
            <div class="ui top attached segment">
                <!--有两列 被设置   middle aligned垂直居中 -->
                <div class="ui middle aligned two column grid">
                    <div class="column">
                        <h3 class="ui teal header">搜索结果</h3>
                    </div>
                    <div class="right aligned column">
                        共 <h3 class="ui orange header m-inline-block" th:text="${page.totalElements}">14</h3>篇
                    </div>
                </div>
            </div>
            <!--attached 贴附-->
            <!--中间以下  teal 绿边-->
            <div class="ui segment attached teal">

                <div class="ui padded vertical segment" th:each="blog : ${page.content}">
                    <div class="ui middle aligned mobile stackable grid" >
                        <div class="eleven wide column">
                            <!--target="_blank"点击后会打开新的标签页 去访问-->
                            <h3 class="ui header"><a href="#" th:href="@{/blog/{id}(id =${blog.id})}" target="_blank" th:text="${blog.title}">你真的理解Cookie吗?</a></h3>
                            <p class="m-text" th:text="|${blog.content}......|">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                Cookie，翻译过来是“甜点”，有时也用其复数形式 Cookies。类型为“小型文本文件”，
                                是某些网站为了辨别用户身份，进行Session跟踪而储存在用户本地
                                终端上的数据（通常经过加密），由用户客户端计算机暂时或永久保存的信息
                            </p>
                            <!--stackable 字体自动换行-->
                            <div class="ui stackable grid">
                                <div class="eleven wide column">
                                    <div class="ui horizontal link list">
                                        <div class="item">
                                            <img src="https://picsum.photos/id/1000/100/100" alt="" th:src="@{${blog.user.avatar}}" class="avatar ui image">
                                            <div class="content"><a href="#" class=" header" th:text="${blog.user.nickname}">猪猪</a></div>
                                        </div>
                                        <div class="item">
                                            <i class="calendar icon"></i><span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2021-5-4</span>
                                        </div>
                                        <div class="item">
                                            <i class="eye icon"></i><span th:text="${blog.views}">2122</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="five wide column">
                                    <a href="#" target="_blank" class="ui label m-padd-mini" th:text="${blog.type.name}">认知升级</a>

                                </div>
                            </div>
                        </div>
                        <div class="five wide column">
                            <!--th:href="@{/blog/{id}}"点击查看详情-->
                            <a href="#" th:href="@{/blog/{id}(id =${blog.id})}" target="_blank">
                                <img src="https://picsum.photos/id/1000/800/450" alt="" th:src="@{${blog.firstPicture}}" class="ui rounded image">
                            </a>
                        </div>
                    </div>
                </div>

                <!--/*-->
                <div class="ui padded vertical segment">
                    <div class="ui grid">
                        <div class="eleven wide column">
                            <h3 class="ui header">你真的理解Cookie吗?</h3>
                            <p class="m-text">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                Cookie，翻译过来是“甜点”，有时也用其复数形式 Cookies。类型为“小型文本文件”，
                                是某些网站为了辨别用户身份，进行Session跟踪而储存在用户本地
                                终端上的数据（通常经过加密），由用户客户端计算机暂时或永久保存的信息
                            </p>
                            <div class="ui stackable grid">
                                <div class="eleven wide column">
                                    <div class="ui horizontal link list">
                                        <div class="item">
                                            <img src="https://picsum.photos/id/1000/100/100" alt=""
                                                 class="avatar ui image">
                                            <div class="content"><a href="#" class=" header">猪猪</a></div>
                                        </div>
                                        <div class="item">
                                            <i class="calendar icon"></i>2021-5-4
                                        </div>
                                        <div class="item">
                                            <i class="eye icon"></i>2122
                                        </div>
                                    </div>
                                </div>
                                <div class="five wide column">
                                    <a href="#" target="_blank" class="ui label m-padd-mini">认知升级</a>
                                </div>
                            </div>
                            <div class="row">
                                <div class="column">
                                    <a href="#" target="_blank"
                                       class="ui mini teal basic left pointing label m-margin-tb-thin">方法论</a>
                                </div>
                            </div>
                        </div>
                        <div class="five wide column">
                            <a href="#" target="_blank">
                                <img src="https://picsum.photos/id/1000/800/450" alt="" class="ui rounded image">
                            </a>
                        </div>
                    </div>
                </div>
                <!--*/-->
                <div class="ui bottom vertical segment">
                    <!--有两列 被设置   middle aligned垂直居中 -->
                    <div class="ui middle aligned two column grid" th:if="${page.totalPages}>1">
                        <div class="column">
                            <a th:href="@{/(page=${page.number}-1)}"  th:unless="${page.first}" class="ui mini teal basic button">上一页</a>
                        </div>
                        <div class="right aligned column">
                            <a th:href="@{/(page=${page.number}+1)}"  th:unless="${page.last}" class="ui mini teal basic button">下一页</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <br/>
</div>

<!--底部      m-padded-d-mass间隔-->
<footer class="ui segment inverted vertical segment m-padded-d-mass bg" th:replace="_fragments :: footer">
    <!--container容器 center aligned居中-->
    <div class="ui center aligned container bg">
        <!--grid会把一些布局分为12列  devided加线 -->
        <div class="ui inverted divided grid bg">
            <div class="three wide column m-opacity-mini m-text-space m-text-thin m-text-lined">
                <div class="ui inverted link list bg">
                    <img src="../static/image/wo.jpg" alt="" class="ui rounded image" style="width:110px">

                </div>
            </div>
            <div class="three wide column m-opacity-mini m-text-space m-text-thin m-text-lined">
                <h4 class="ui inverted header">最新博客</h4>
                <div class="ui inverted link list ">
                    <a href="#" class="item">会飞的羊</a>
                    <a href="#" class="item">会飞的羊</a>
                    <a href="#" class="item">会飞的羊</a>
                </div>
            </div>
            <div class="three wide column m-opacity-mini m-text-space m-text-thin m-text-lined">
                <h4 class="ui inverted header">联系我吖</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">QQ:822021336</a>
                    <a href="#" class="item">邮箱：xihao.luck@qq.com</a>
                    <a href="#" class="item"></a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header m-opacity-mini m-text-space m-text-thin m-text-lined">最新博客</h4>
                <p class="m-opacity-mini m-text-space m-text-thin m-text-lined">
                    这是我的个人博客，用于记录我在网上收集的文章，自己的代码笔记，和优秀的文案等等。欢迎大家关注！</p>
            </div>
        </div>
        <div class="ui inverted section divider m-opacity-mini m-text-space m-text-thin m-text-lined "></div>
        <p class="m-opacity-mini m-text-space m-text-thin m-text-lined">Copyright © 2021-2022 会飞的羊 </p>
    </div>

</footer>

<!--jquery-->

<script>
    <!--点击.menu.toggle按钮加入m-mobile-hide样式-->
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide')
    });

    $("#newblog-container").load(/*[[@{/footer/newblog}]]*/"/footer/newblog");


</script>
</body>
</html>